

// Particle texture and sampler.
texture2D Texture;

sampler2D Sampler = sampler_state
{
    Texture = (Texture);
    
    MinFilter = Linear;
    MagFilter = Linear;
    MipFilter = Point;
    
    AddressU = Clamp;
    AddressV = Clamp;
};




// Vertex shader output structure specifies the position and color of the particle.
struct VertexShaderOutput
{
    float4 Position : POSITION0;
	float4 Teint : COLOR0;
    float2 TextureCoordinate : COLOR1;
};




// Pixel shader for drawing particles.
float4 main(VertexShaderOutput input) : COLOR0
{
	//return float4(1,1,1,1);
	float4 color = tex2D(Sampler, input.TextureCoordinate);
	return float4(color.rgb * input.Teint.rgb, color.a) * input.Teint.a;
}
